package com.gujiangbo.juc;

import org.openjdk.jol.info.ClassLayout;

/**
 * @Author: gujiangbo.co
 * @Contact: 646832012@qq.com
 * @Date: 2022/6/5 16:50
 * @Version: 1.0
 * @Description:
 */
public class JavaObjectHeadDemo {

    public static void main(String[] args) {
        Object obj = new Object();
        System.out.println(ClassLayout.parseInstance(obj).toPrintable());
        System.out.println("---------------------------------------");
        synchronized (obj) {
            System.out.println(ClassLayout.parseInstance(obj).toPrintable());
            System.out.println("---------------------------------------");
            synchronized (obj){
                System.out.println(ClassLayout.parseInstance(obj).toPrintable());
            }
        }

    }

}
